package io.github.talelin.latticy.bo;

import io.github.talelin.latticy.dto.BannerDTO;
import io.github.talelin.latticy.model.BannerDO;
import io.github.talelin.latticy.model.BannerItemDO;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.boot.Banner;

import java.util.List;

@Data
@NoArgsConstructor
public class BannerWithItemBO {

     private Long id;
     private String name;
     private String title;
     private String img;
     private String description;

     List<BannerItemDO> items;

     public BannerWithItemBO(BannerDO bannerDO,List<BannerItemDO> bannerItemDOList){
         BeanUtils.copyProperties(bannerDO, this);
         this.setItems(bannerItemDOList);

     }

}
